package com.nuanshui.heatedloan.task.service;

import java.util.List;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.nuanshui.heatedloan.constant.TransactionManagerType;
import com.nuanshui.heatedloan.pageable.Pager;
import com.nuanshui.heatedloan.search.facade.util.SearchUtil;
import com.nuanshui.heatedloan.task.facade.model.TaskLog;
import com.nuanshui.heatedloan.task.facade.service.TaskLogService;

/**
 * 任务执行日志service
 * @param 
 * @author guohao
 * @date 2017年2月13日 上午10:06:36
 * @since $
 */
@Service("taskLogService")
@Transactional(readOnly=true,value=TransactionManagerType.TASK_TRANSACTIONMANAGER)
public class TaskLogServiceImpl implements TaskLogService,InitializingBean {

	
	@Autowired
	private SearchUtil searchUtil;
	
	@Override
	public List<TaskLog> find(String jobCode) {
		TaskLog taskLog = new TaskLog();
		taskLog.setJobCode(jobCode);
		return searchUtil.find(taskLog, new Pager<>(0, 500));
		
	}

	@Override
	public void afterPropertiesSet() throws Exception {
		
	}

}
